package com.econ.powercloud.ems.controller.lowpressure;

import com.econ.powercloud.common.base.facade.pojo.MsgResult;
import com.econ.powercloud.ems.controller.ApiBaseController;
import com.econ.powercloud.ems.pojo.DeviceYkShowVO;
import com.econ.powercloud.ems.pojo.DeviceYtShowVO;
import com.econ.powercloud.ems.service.biz.EmsYkYtShowService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author : zjf
 * @Description : EMS项目低压有关遥控遥调的展示数据controller
 * @Date : 2022/1/10 9:08
 * @Modified by : zjf
 */
@Api(tags = "低压遥控遥调展示")
@RestController
@RequestMapping(value = "/api/v2/low/remote/show")
public class EmsLowYkYtShowController extends ApiBaseController {

    @Autowired
    private EmsYkYtShowService emsYkYtShowService;

    @ApiOperation(value = "PCU模块遥控遥调数据")
    @GetMapping(value = "getPCUYt")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "deviceCode", value = "PCS设备code", dataType = "String")
    })
    public MsgResult<List<DeviceYtShowVO>> getPCUModuleYt(@RequestParam(value = "deviceCode")String deviceCode){
        return successHandler(emsYkYtShowService.getPCUModuleYt(deviceCode));
    }

    @ApiOperation(value = "PCS充放电模式")
    @GetMapping(value = "getPCSCharge")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "deviceCode", value = "PCS设备code", dataType = "String")
    })
    public MsgResult<DeviceYkShowVO> getPCSCharge(@RequestParam(value = "deviceCode")String deviceCode){
        return successHandler(emsYkYtShowService.getPCSChargeYk(deviceCode));
    }

}
